package com.fulu.game.bi.redis.service.channel;

import com.fulu.game.bi.entity.po.channel.RegistSource;
import com.fulu.game.bi.entity.vo.channel.source.RegisterSourceDisplayVO;
import com.fulu.game.bi.entity.vo.channel.source.RegisterSourceQueryVO;
import com.fulu.game.bi.entity.vo.channel.source.RegisterSourceSaveVO;
import com.github.pagehelper.PageInfo;

import java.util.List;
import java.util.Map;
import java.util.Set;


/**
 * @ Author     ：zsw.
 * @ Date       ：Created in 11:03 2020/7/1
 * @ Description：渠道service
 */
public interface RegisterSourceService {
    /**
     * 新增
     */
    RegistSource save(RegisterSourceSaveVO registSourceVO);

    /**
     * 列表查询
     */
    PageInfo<RegisterSourceDisplayVO> list(RegisterSourceQueryVO vo);

    /**
     * 查询渠道号
     *
     * @param platforms
     * @return
     */
    List<RegistSource> findByPlatforms(Integer[] platforms);

    /**
     * 查询渠道名称
     *
     * @param names
     * @return
     */
    List<RegistSource> findByNames(String[] names);

    // 批量新增
    int createBatch(List<RegistSource> list);

    // 批量创建关系
    int createBatchRel(List<RegistSource> registSources, Map<Integer, Set<Integer>> groupIdsMap);
}
